//
//  ViewController.swift
//  lesson11 空项目
//
//  Created by 张建 on 2018/3/16.
//  Copyright © 2018年 micheal. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = UIColor.green
        
        let btn = UIButton(type: UIButtonType.detailDisclosure)
        btn.tag = 100
        btn.addTarget(self,action:#selector(clickBtn(btn:)), for: UIControlEvents.touchUpInside)
        btn.frame = CGRect(x:0, y:10, width:60, height:60)
        view.addSubview(btn)
        
    }

    
    @objc func clickBtn(btn: UIButton) {
        
        print(btn.tag)
    }
    
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    
}

